package com.yuma.account.service.impl;

import com.yuma.account.entity.Account;
import com.yuma.account.mapper.AccountMapper;
import com.yuma.account.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Transactional
    @Override
    public int updateByUserId(Account account) {
        int row = accountMapper.updateByUserId(account);
        // int i = 1/0;   // 模拟异常
        return row;
    }
}
